<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/newsmaintemplate.xhtml">
	<ui:define name="navigation">
		<h:panelGroup>
			<f:event type="preRenderComponent" listener="#{navigationMapBackingBean.clearNavigationMap()}" />
			<ui:include src="/navigation.xhtml"></ui:include>
		</h:panelGroup>
	</ui:define>
	<ui:define name="leftpage">
		<div class="titleOnThreadIndex">
			<h:outputText value="#{msgs.TopThreads}" />
		</div>
		<h:form id="indexForm">

			<ui:repeat value="#{threadDashBoardCacheService.allCategoryArray}" var="categoryName">

				<p:dataTable value="#{threadDashBoardCacheService.getDashBoards(categoryName)}" var="threadDashBoard">
					<f:facet name="header">
						<h:link value="#{categoryName}" outcome="/thread/listthreads.xhtml" styleClass="sectionTitle">
							<f:param name="ctgtThdId" value="#{threadDashBoardCacheService.getCategoryId(categoryName)}"></f:param>
						</h:link>
					</f:facet>
					<p:column>
						<h:link value="#{threadDashBoard.threadSubject}" outcome="/thread/viewthread.xhtml">
							<f:param name="id" value="#{threadDashBoard.threadId}"></f:param>
						</h:link>
					</p:column>
				</p:dataTable>

			</ui:repeat>
		</h:form>
	</ui:define>
	<ui:define name="rightpage">
		<h:form>
			<p:dataList value="#{threadDashBoardCacheService.mostRecentThreadList}" var="thread" itemType="disc">
				<f:facet name="header">#{msgs.MOSTRECENTTHREAD}</f:facet>
				<h:link value="#{thread.subject}" outcome="/thread/viewthread" styleClass="longstyle">
					<f:param name="id" value="#{thread.id}"></f:param>
				</h:link>
			</p:dataList>
		</h:form>
	</ui:define>
</ui:composition>
</html>